﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Pampa.Grid.Core.Actions;
using Pampa.MVC.Fluent.Common;
using Action = Pampa.Grid.Core.Actions.Action;

namespace Pampa.MVC.Fluent.Grid
{
    public class ActionBuilder<T, TThis> : AbstractBuilder where TThis : ActionBuilder<T, TThis>
    {
        private readonly Action _action;

        protected ActionBuilder(Action action)
        {
            _action = action;
        }

        public TThis MethodName(string methodName)
        {
            _action.MethodName = methodName;
            return (TThis)this;
        }

        public TThis Text(string text)
        {
            _action.Text = text;
            return (TThis)this;
        }
    }
}
